package com.loan.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.loan.group.GetAppointRepayment;
import com.loan.group.GetRepaymentAllInfoGroup;
import com.loan.group.RepaymentPayGroup;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 功能描述: <br>
 *
 * @Param:
 * @Return:
 * @Author: wYin
 * @Date: 2022/1/18 18:08
 */
@Data
public class Repayment {
  @TableId(value = "id",type = IdType.AUTO)
  @NotNull(message = "还款表的id不能为空",groups = {RepaymentPayGroup.class,GetRepaymentAllInfoGroup.class})
  private Integer id;
  @NotNull(message = "还款时合同的id不能为空",groups = {RepaymentPayGroup.class,GetAppointRepayment.class, GetRepaymentAllInfoGroup.class})
  private Integer conId;
  @NotNull(message = "员工id不能为空",groups = {GetAppointRepayment.class})
  private Integer empId;
  private BigDecimal money;
  private Date actualTime;//实际还款时间
  private Date appoTime;//约定还款时间
  private String status;
  @NotNull(message = "贷款客户id不能为空",groups = {RepaymentPayGroup.class,GetRepaymentAllInfoGroup.class})
  private Integer cusId;
  @NotNull(message = "还款方式不能为空",groups = {RepaymentPayGroup.class})
  private Integer repaymentMethodId;
  private BigDecimal principal;
  private BigDecimal interest;
  private BigDecimal penaltyInterest;
  //todo:新增是否支付罚金选择(y|n)
  @TableField(exist = false)
  private char penaltyStatus;
}
